//
//  RABookrackBottomView.m
//  ReadApp
//
//  Created by 朱献国 on 2018/11/13.
//  Copyright © 2018年 Facebook. All rights reserved.
//

#import "RABookrackBottomView.h"

@interface RABookrackBottomView ()

@property (nonatomic, strong) UILabel *titleLab;

@property (nonatomic, strong) UILabel *detailLab;

@end

@implementation RABookrackBottomView

#pragma mark - LifeCycle
- (instancetype)initWithFrame:(CGRect)frame {
  self = [super initWithFrame:frame];
  if (self) {
    [self createViews];
  }
  return self;
}

- (instancetype)initWithCoder:(NSCoder *)coder {
  self = [super initWithCoder:coder];
  if (self) {
    [self createViews];
  }
  return self;
}

- (void)layoutSubviews {
  [super layoutSubviews];
  
}

#pragma mark - CreateViews
- (void)createViews {
  self.backgroundColor = [UIColor whiteColor];
  
  [self addSubview:self.titleLab];
  [self addSubview:self.detailLab];
  
  [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
    make.centerX.mas_equalTo(0);
    make.top.mas_equalTo(21);
  }];
  
  [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
    make.centerX.mas_equalTo(0);
    make.top.mas_equalTo(self.titleLab.mas_bottom).mas_offset(10);
  }];
  
}

#pragma mark - Lazyload

- (UILabel *)titleLab {
  if (!_titleLab) {
    _titleLab = [UILabel new];
    _titleLab.font = [UIFont boldSystemFontOfSize:16.f];
    _titleLab.textColor = UIColorHex(666666);
    _titleLab.textAlignment = NSTextAlignmentCenter;
    _titleLab.text = @"书架暂无收藏";
  }
  return _titleLab;
}


- (UILabel *)detailLab {
  if (!_detailLab) {
    _detailLab = [UILabel new];
    _detailLab.font = [UIFont systemFontOfSize:12.f];
    _detailLab.textColor = UIColorHex(999999);
    _detailLab.textAlignment = NSTextAlignmentCenter;
    _detailLab.text = @"小说详情页可以添加收藏\n长按已收藏的小说，可移除收藏";
    _detailLab.numberOfLines = 0;
  }
  return _detailLab;
}



@end
